html {
    box-sizing: border-box;
    background-color: #eee;
    font-family: 'helvetica neue';
    font-size: 20px;
    font-weight: 200;
}

body {
    margin: 0;
    padding: 0;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.site-wrap {
    max-width: 700px;
    padding: 40px;
    margin: 70px auto;
    background-color: #fff;
    box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1); /* 0.05 改为 0.1，这样更明显 */

    text-align: justify;

    transform: scale(0.98);
    transition: transform 0.5s;
}

header {
    height: 50vh;
    background-image: url("./header.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    text-align: center;

    display: flex;
    justify-content: center;
    align-items: center;
}

h1 {
    color: #ccc;
    font-size: 7vw;
    text-shadow: 3px 4px 0 rgba(0, 0, 0, 0.2);
}

nav {
    width: 100%;
    background-color: #000;

    position: relative;
    top: 0;
    z-index: 1;

    transition: all 0.5s;
}

nav ul {
    padding: 0;
    margin: 0;

    list-style: none;

    display: flex;
}

nav li {
    flex: 1;

    text-align: center;

    display: flex;
    justify-content: center;
    align-items: center;
}

li.logo {
    max-width: 0;
    background-color: #fff;
    font-size: 30px;
    font-weight: 600;

    overflow: hidden;

    transition: all 0.5s;
}

li.logo a {
    color: #000;
}

nav a {
    padding: 20px;

    color: #fff;
    text-decoration: none;
    text-transform: uppercase;

    display: inline-block;

    transition:all 0.2s;
}

.fixed-nav {
  position:fixed;
}

/* 以下来自挑战 13 */

.align-left {
    float: left;
    margin-right: 20px;
}

.align-right {
    float: right;
    margin-left: 20px;
}

.slide-in {
    opacity: 0; /* 隐去图片，形成空位 */
    transition: all 0.7s;
}

.align-left.slide-in {
    /* 使图片左移，并缩小为原来的 95% */
    transform: translateX(-30%) scale(0.95);
}

.align-right.slide-in {
    /* 使图片右移，并缩小为原来的 95% */
    transform: translateX(30%) scale(0.95);
}

.slide-in.active {
    /* active 时，使图片恢复到原位及原样 */
    opacity: 1;
    transform: translateX(0%) scale(1);
}
